package com.spring.demo.core.event;

import org.springframework.context.ApplicationEvent;

import com.spring.demo.core.entity.Order;

public class OnOrderStatusChanged extends ApplicationEvent {

	private static final long serialVersionUID = 1L;
	private Order order;

	public OnOrderStatusChanged(Order order) {
		super(order);
		this.order = order;
		System.out.println("Order status changed to " + order.getStatus());
	}

	public Order getOrder() {
		return order;
	}

}
